from sqlalchemy import Column, String
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class TBBBEPatientInfo(Base):
    """
    乳腺检查病人信息模型类
    对应数据库表: tb_bbe_patient_info
    """
    __tablename__ = 'tb_bbe_patient_info'
    
    # 主键ID
    id = Column(String(255), primary_key=True)
    
    # 姓名
    name = Column(String(255), nullable=True)
    
    # 性别
    sex = Column(String(255), nullable=True)
    
    # 年龄
    age = Column(String(255), nullable=True)
    
    # 检查编号
    check_code = Column(String(255), nullable=True)
    
    # 检查时间
    check_time = Column(String(255), nullable=True)
    
    # 联系电话
    phone = Column(String(255), nullable=True)
    
    # 左乳头
    l_nipple = Column(String(255), nullable=True)
    
    # 左乳头溢液
    l_discharge = Column(String(255), nullable=True)
    
    # 左皮肤
    l_skin = Column(String(255), nullable=True)
    
    # 左腺体
    l_gland = Column(String(255), nullable=True)
    
    # 左疼痛
    l_pain = Column(String(255), nullable=True)
    
    # 左副乳
    l_supernumerary_breast = Column(String(255), nullable=True)
    
    # 右乳头
    r_nipple = Column(String(255), nullable=True)
    
    # 右乳头溢液
    r_discharge = Column(String(255), nullable=True)
    
    # 右皮肤
    r_skin = Column(String(255), nullable=True)
    
    # 右腺体
    r_gland = Column(String(255), nullable=True)
    
    # 右疼痛
    r_pain = Column(String(255), nullable=True)
    
    # 右副乳
    r_supernumerary_breast = Column(String(255), nullable=True)
    
    # 病变名称
    lesion_name = Column(String(255), nullable=True)
    
    # 病变位置
    lesion_position = Column(String(255), nullable=True)
    
    # 病变区域
    lesion_region = Column(String(255), nullable=True)
    
    # 病变角度
    lesion_angle = Column(String(255), nullable=True)
    
    # 病变宽度
    lesion_width = Column(String(255), nullable=True)
    
    # 病变高度
    lesion_height = Column(String(255), nullable=True)
    
    # 病变硬度
    lesion_hardness = Column(String(255), nullable=True)
    
    # 病变边界
    lesion_boundary = Column(String(255), nullable=True)
    
    # 病变光滑度
    lesion_smoothness = Column(String(255), nullable=True)
    
    # 病变形状
    lesion_shape = Column(String(255), nullable=True)
    
    # 病变压痛
    lesion_pressure = Column(String(255), nullable=True)
    
    # 病变诊断
    lesion_diagnosis = Column(String(255), nullable=True)
    
    # 病变肋骨干扰
    lesion_rib_interference = Column(String(255), nullable=True)
    
    # CIES囊肿
    cies_cyst = Column(String(255), nullable=True)
    
    # CIES实性肿块
    cies_solid_mass = Column(String(255), nullable=True)
    
    # CIES实性肿块位置
    cies_solid_mass_location = Column(String(255), nullable=True)
    
    # CIES实性肿块宽度
    cies_solid_mass_width = Column(String(255), nullable=True)
    
    # CIES实性肿块高度
    cies_solid_mass_height = Column(String(255), nullable=True)
    
    # CIES形状
    cies_shape = Column(String(255), nullable=True)
    
    # CIES方向
    cies_orientation = Column(String(255), nullable=True)
    
    # CIES边缘
    cies_margins = Column(String(255), nullable=True)
    
    # CIES晕征
    cies_halo_sign = Column(String(255), nullable=True)
    
    # CIES内部回声
    cies_internal_echogenicity = Column(String(255), nullable=True)
    
    # CIES内部回声模式
    cies_internal_echo_pattern = Column(String(255), nullable=True)
    
    # CIES后方特征
    cies_posterior_features = Column(String(255), nullable=True)
    
    # CIES钙化
    cies_calcifications = Column(String(255), nullable=True)
    
    # CIES血管性
    cies_vascularity = Column(String(255), nullable=True)
    
    # CIES腋窝淋巴结
    cies_axillary_lymph_nodes = Column(String(255), nullable=True)
    
    # CIES BI-RADS分类
    cies_bi_rads = Column(String(255), nullable=True)
    
    # 月经来源
    m_source = Column(String(255), nullable=True)
    
    # 肿块侧别
    m_lump_side = Column(String(255), nullable=True)
    
    # 持续时间
    m_duration = Column(String(255), nullable=True)
    
    # 哺乳期
    m_lactation = Column(String(255), nullable=True)
    
    # 疼痛
    m_pain = Column(String(255), nullable=True)
    
    # 发热
    m_fever = Column(String(255), nullable=True)
    
    # 备注
    m_memo = Column(String(255), nullable=True)
    
    # 左淋巴结
    l_lymph = Column(String(255), nullable=True)
    
    # 右淋巴结
    r_lymph = Column(String(255), nullable=True)
    
    def __repr__(self):
        return f"<TBBBEPatientInfo(id='{self.id}', name='{self.name}', sex='{self.sex}')>"